package logic

import (
	"GoWebBluebell/dao/redis"
	"GoWebBluebell/models"
	"strconv"

	"go.uber.org/zap"
)

func VoteForPost(userID int64, p *models.ParamVoteDate) error {
	zap.L().Debug("VoteForPost",
		zap.Int64("userID", userID),
		zap.Int64("postID", p.PostID))
	return redis.VoteForPost(strconv.Itoa(int(userID)), strconv.Itoa(int(p.PostID)), float64(*p.Direction))

}
